Writing adjacent tracks to a stride, based on a comparison of a destaging of tracks to a defragmentation of the stride

ABSTRACT

Compressed data is maintained in a plurality of strides of a redundant array of independent disks, wherein a stride is configurable to store a plurality of tracks. A request is received to write one or more tracks. The one or more tracks are written to a selected stride of the plurality of strides, based on comparing the number of operations required to destage selected tracks from the selected stride to the number of operations required to defragment the compressed data in the selected stride.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.13/787,696, filed Mar. 6, 2013, wherein U.S. patent application Ser. No.13/787,696 is a continuation of U.S. patent application Ser. No.13/087,236, filed Apr. 14, 2011, the disclosure of each of which ishereby incorporated herein by reference in its entirety.

BACKGROUND

1. Field

The disclosure relates to a method, system, and article of manufacturefor writing adjacent tracks to a stride based on a comparison of adestaging of tracks to a defragmentation of the stride.

2. Background

A storage system may include a storage controller that controls aplurality of storage devices. The plurality of storage devicescontrolled by the storage controller may include solid state disks, harddisks, tapes, etc.

A host computational device may send input/output (I/O) requests to thestorage controller. The storage controller may satisfy the I/O requestsby reading data from one or more storage devices, or by writing data toone or more storage devices. Once the I/O requests are satisfied thestorage controller may send appropriate responses to the hostcomputational device.

SUMMARY OF THE PREFERRED EMBODIMENTS

Provided are a method, a system, and a computer program product in whichcompressed data is maintained in a plurality of strides of a redundantarray of independent disks (RAID), wherein a stride is configurable tostore a plurality of tracks. A request is received to write one or moretracks. The one or more tracks are written to a selected stride of theplurality of strides, based on comparing the number of operationsrequired to destage selected tracks from the selected stride to thenumber of operations required to defragment the compressed data in theselected stride.

In further embodiments, a determination is made by a managementapplication executing in a controller coupled to the redundant array ofindependent disks and a cache, as to whether a first estimated durationof time to perform the number of operations required to destage theselected tracks from the selected stride represented in the cache is asmaller amount of time in comparison to a second estimated duration oftime required to defragment the compressed data in the selected striderepresented in the cache. The selected tracks are destaged from thecache, by a destaging application executing in the controller, inresponse to determining that the first estimated duration of time is asmaller amount of time in comparison to the second estimated duration oftime.

In yet further embodiments, in response to determining that the firstestimated duration of time is not a smaller amount of time in comparisonto the second estimated duration of time, a defragmentation applicationexecuting in the controller defragments the selected stride.

In additional embodiments, the writing the one or more tracks to theselected stride of the plurality of strides is performed subsequent tothe destaging or the defragmenting. Additionally, the destaging or thedefragmenting creates adequate space in the selected stride to write theone or more tracks.

In yet additional embodiments, the destaging of the selected tracks isperformed by copying the selected tracks from the cache to physicalstorage, and by deleting the selected tracks in the selected striderepresented in the cache. The defragmentation of the selected stride isperformed by moving existing tracks in the selected stride adjacent toeach other towards the beginning of the selected stride and creatingcontiguous free space towards the end of the selected stride.

In further embodiments, the redundant array of independent disks areconfigured to conform to a RAID-5 level in which data and paritystriping is performed across all drives.

In additional embodiments, a deployment of computing infrastructure isperformed. Computer-readable code is integrated into a computationalsystem, wherein the computer-readable code in combination with thecomputational system performs the maintaining of the compressed data inthe plurality of strides of the redundant array of independent disks,the receiving of the request to write the one or more tracks, and thewriting the one or more tracks to the selected stride of the pluralityof strides.

In yet additional embodiments, the integrating of the computer-readablecode into the computational system is performed by downloading thecomputer-readable code to the computational system in a networkedcomputing environment.

BRIEF DESCRIPTION OF THE DRAWINGS

Referring now to the drawings in which like reference numbers representcorresponding parts throughout:

FIG. 1 illustrates a block diagram of a computing environment thatincludes a controller that controls a RAID array, in accordance withcertain embodiments;

FIG. 2 illustrates a block diagram of a first embodiment in which one ormore adjacent tracks are written to a selected stride, in response to adefragmentation of a stride being faster in comparison to a destaging oftracks, in accordance with certain embodiments;

FIG. 3 illustrates a block diagram of a second embodiment in which oneor more adjacent tracks are written to a selected stride, in response toa destaging of tracks being faster in comparison to a defragmentation ofa stride, in accordance with certain embodiments;

FIG. 4 illustrates a first flowchart that shows certain operations, inaccordance with certain embodiments;

FIG. 5 illustrates a second flowchart that shows certain operations, inaccordance with certain embodiments; and

FIG. 6 illustrates a block diagram of a computational system that showscertain elements that may be included in the controller of FIG. 1, inaccordance with certain embodiments.

DETAILED DESCRIPTION

In the following description, reference is made to the accompanyingdrawings which form a part hereof and which illustrate severalembodiments. It is understood that other embodiments may be utilized andstructural and operational changes may be made.

A storage system may include a cache that may store frequently orrecently used data. The cache may be implemented in a first storagedevice that can be accessed relatively faster in comparison to a secondstorage device. The storage capacity of the first storage device (i.e.,the cache) is usually much smaller than the storage capacity of thesecond storage device. For example, the first storage device (i.e., thecache) may comprise a solid state device and the second storage devicemay comprise a disk drive

A plurality of disk drives may be combined to form a special category ofdisk drive that is referred to as a Redundant Array of Independent Disks(RAID). RAID may provide a higher degree of fault tolerance for data.The physical disks of RAID may be said to be in a RAID array that may beaddressed by an operating system as one single disk. A stride is a unitof storage in the RAID array and each stride may comprise a plurality oftracks, wherein a track represents one of a series of thin concentricrings on a disk, which the read/write head of the disk accesses andalong which data is stored.

Data compression is the storing of data in a format that requires lessstorage space than the original data, wherein the original data iscompressed to provide compressed data. In certain storage systems, aRAID array may be implemented in combination with a cache, and the RAIDarray may store compressed or uncompressed data.

Certain embodiments determine whether it is preferable to defragment astride or whether it is preferable to destage tracks from the stride, inorder to create contiguous free space within the stride.

When adequate contiguous space to store a plurality of adjacent tracksis not available in a stride that is represented in a cache, either thestride has to defragmented to generate contiguous space for theplurality of adjacent tracks or existing tracks of the stride has to bedestaged. When a stride is defragmented, existing tracks within thestride are coalesced together and empty space between tracks iseliminated. When an existing track is destaged from the cache, theexisting track is moved from the cache to some other storage with aslower response time than the cache. Both defragmentation and destagingoperations may be relatively time consuming operations as they mayinvolve the movement of a considerable amount of data that are stored intracks.

Certain embodiments determine whether to perform defragmentation of astride or whether to perform destaging of tracks to create adequatecontiguous space to write a plurality of adjacent tracks to the stride.If defragmentation is likely to be faster then defragmentation isperformed, whereas if destaging of tracks is likely to be faster thendestaging of tracks is performed.

Details of Embodiments

FIG. 1 illustrates a block diagram of a computing environment 100 thatincludes a controller 102 that controls a RAID array 104, in accordancewith certain embodiments. A host 106 may generate input/output (I/O)requests to the controller 102, causing the controller 102 to read orwrite tracks with respect to the RAID array 104 via a cache 108. TheRAID array 104 is a logical representation of a combination of aplurality of disks, wherein a representation of the RAID array may bemaintained in the cache 108 and operations on the RAID array 104 may beperformed via the cache 108. The RAID array 104 may be configured to beof any type of RAID level. For example, in certain embodiments, the RAIDarray 104 is configured to conform to a RAID-5 level in which data andparity striping may be performed across all drives. In otherembodiments, the RAID array 104 may be configured to be of some othertype of RAID level such as RAID-1, RAID-2, RAID-3, RAID-4, RAID-6, etc.

The controller 102 and the host 106 may comprise any suitablecomputational device including those presently known in the art, suchas, a personal computer, a workstation, a server, a mainframe, a handheld computer, a palm top computer, a telephony device, a networkappliance, a blade computer, a server, etc. The controller 102, the RAIDarray 104, the host 106, and the cache 108 may be components in adistributed computing environment, such as a cloud computing environmentor a networked computing environment.

In certain embodiments, the RAID array 104 may store one or more strides110. Each stride 110 may store a plurality of tracks 112 a . . . 112 n.Each of the tracks 112 a . . . 112 n represent one of a series of thinconcentric rings on a disk, which a read/write head accesses and alongwhich data is stored in separate sectors. A stride is a unit of storagein a RAID array in which tracks may be stored. In certain embodiments,compressed data is stored in the strides 110 of the RAID array 104. Incertain alternative embodiments, other units of storage besides stridesmay also be implemented in the RAID array 104.

In certain embodiments, the controller 102 has a management application114, a defragmentation application 116, and a destaging application 118that execute within the controller 102. The controller 102 also storesstride and track organization information 120 related to the strides 110and the tracks 112 a . . . 112 n of the RAID array 104.

In certain embodiments, the management application 114 performsoperations to control the RAID array 104 that is represented in thecache 108. The defragmentation application 116 may perform operations todefragment a stride 110. The destaging application 118 may performoperations to destage, i.e., move, tracks of the RAID array 104 from thecache 108 to some other storage that is slower than the cache 108. Thestride and track organization information 120 is used by the managementapplication 114, the defragmentation application 116, and the destagingapplication 118 to perform various operations related to the strides 110and the tracks 112 a . . . 112 n.

FIG. 2 illustrates a block diagram 200 of a first embodiment 202 inwhich one or more adjacent tracks are written to a selected stride, inresponse to a defragmentation of a stride being faster in comparison toa destaging of tracks, in accordance with certain embodiments.

In the first embodiment 202 shown in FIG. 2, one or more adjacent tracksshown as track 777 (reference numeral 204), track 778 (reference numeral206), track 779 (reference numeral 208) and track 780 (reference numeral210) are to be written to a selected stride 212, wherein the selectedstride 212 may be a stride of the RAID array 104 that is shown in FIG.1.

It can be seen that while four consecutive tracks numbered 777, 778,779, 780 (shown via reference numerals 204, 206, 208, 210) are to bewritten to the selected stride 212, the selected stride 212 does haveadequate contiguously located free space to accommodate the fourconsecutive tracks that are to be written. For example, while there isenough free space (shown via reference numerals 214, 216, 218, 220, 222)to place five tracks, the existing tracks (track #A 224, track #B 226,and track #C 228) are stored in a configuration such that the fourconsecutive tracks 777, 778, 779, 780 (shown via reference numerals 204,206, 208, 210) cannot be stored contiguously within the free space ofthe selected stride 212.

In certain embodiments, the management application 114 may determinethat to create contiguous space for storing the four consecutive tracksnumbered 777, 778, 779, 780 (shown via reference numerals 204, 206, 208,210) a defragmenting of the selected stride 212 is faster in comparisonto destaging tracks from the selected stride 212. For example, incertain embodiments the management application 114 may determine thatthe estimated time taken to perform operations to destage track #B 226is likely is be more than the estimated time taken to perform operationsto defragment the selected stride 212, where the destaging of track #B226 is also a plausible mechanism to create adequate contiguous freespace to store the four consecutive tracks numbered 777, 778, 779, 780(shown via reference numerals 204, 206, 208, 210) contiguously withinthe selected stride 212. In such embodiments, the management application114 initiates the execution of the defragmentation application 116 todefragment the selected stride 212. The configuration of the selectedstride 212 after defragmentation is shown via reference numeral 230. Theexisting tracks have been coalesced at the beginning of the stride andthe free space follows at the end of the coalesced tracks. There is nowadequate contiguous space 232, 234, 236, 238, 240 to store the fourconsecutive tracks numbered 777, 778, 779, 780 (shown via referencenumerals 204, 206, 208, 210) contiguously within the defragmented stride230.

The management application 114 continues execution after thedefragmentation is over and writes the four consecutive tracks numbered777, 778, 779, 780 (shown via reference numerals 204, 206, 208, 210) inthe defragmented stride 230 to arrive at the configuration of theselected stride shown via reference numeral 242. In the configuration242 of the selected stride the contiguous placement of the fourconsecutive tracks numbered tracks 777, 778, 779, 780 are shown viareference numerals 244, 246, 248, 250.

Therefore, FIG. 2 illustrates certain embodiments in whichdefragmentation of a stride is estimated to be faster in comparison to adestaging of tracks, and as a result defragmentation of the stride isperformed to accommodate adjacent tracks contiguously within the stride.

FIG. 3 illustrates a block diagram 300 of a second embodiment 302 inwhich one or more adjacent tracks are written to a selected stride, inresponse to a destaging of tracks being faster in comparison to adefragmentation of a stride, in accordance with certain embodiments.

In the second embodiment 302 shown in FIG. 3, one or more adjacenttracks shown as track 777 (reference numeral 204), track 778 (referencenumeral 206), track 779 (reference numeral 208) and track 780 (referencenumeral 210) are to be written to a selected stride 212, wherein theselected stride 212 may be a stride of the RAID array 104 that is shownin FIG. 1.

It can be seen that while four consecutive tracks numbered 777, 778,779, 780 (shown via reference numerals 204, 206, 208, 210) are to bewritten to the selected stride 212, the selected stride 212 does nothave adequate contiguously located free space to accommodate the fourconsecutive tracks that are to be written. For example, while there isenough free space (shown via reference numerals 214, 216, 218, 220, 222)to place five tracks, the existing tracks (track #A 224, track #B 226,and track #C 228) are stored in a configuration such that the fourconsecutive tracks 777, 778, 779, 780 (shown via reference numerals 204,206, 208, 210) cannot be stored contiguously within the free space ofthe selected stride 212.

In certain embodiments, the management application 114 may determinethat to create contiguous space for storing the four consecutive tracksnumbered 777, 778, 779, 780 (shown via reference numerals 204, 206, 208,210) destaging tracks from the selected stride 212 is faster incomparison to defragmenting the selected stride 212. For example, incertain embodiments the management application 114 may determine thatthe estimated time taken to perform operations to destage track #B 226is likely is be less than the estimated time taken to perform operationsto defragment the selected stride 212, where the destaging of track #B226 is a plausible mechanism to create adequate contiguous free space tostore the four consecutive tracks numbered 777, 778, 779, 780 (shown viareference numerals 204, 206, 226 208, 210) contiguously within theselected stride 212. In such embodiments, the management application 114initiates the execution of the destaging application 118 to destagetrack #B 226 from the selected stride 212 that is represented in thecache 108. The configuration of the selected stride 212 after destagingis shown via reference numeral 304. The free space indicated viareference numerals 306, 308, 310, 312 shows that there is now adequatecontiguous space to accommodate the four consecutive tracks numbered777, 778, 779, 780 (shown via reference numerals 204, 206, 208, 210).

The management application 114 continues execution after the destagingis over and writes the four consecutive tracks numbered 777, 778, 779,780 (shown via reference numerals 204, 206, 208, 210) in the stride 304that has undergone destaging, to arrive at the configuration of theselected stride shown via reference numeral 316. In the configuration316 of the selected stride the contiguous placement of the fourconsecutive tracks numbered tracks 777, 778, 779, 780 are shown viareference numerals 318. 322, 324, 326.

Therefore, FIG. 3 illustrates certain embodiments in which destaging oftracks from a stride is estimated to be faster in comparison to adefragmentation of the stride, and as a result destaging of tracks ofthe stride is performed to accommodate adjacent tracks contiguouslywithin the stride.

FIG. 4 illustrates a first flowchart 400 that shows certain operations,in accordance with certain embodiments. In certain embodiments, theoperations shown in flowchart 400 may be performed by the managementapplication 114, the defragmentation application 116, and the destagingapplication 118 that may be implemented in software, firmware, hardwareor any combination thereof in the controller 102.

Control starts at block 402 in which the management application 114maintains compressed data in one or more strides 110 of a RAID array104, wherein a stride is configurable to store a plurality of tracks 112a . . . 112 n. A request is received (at block 404), by the managementapplication 114, to write one or more adjacent tracks (e.g., fourconsecutively numbered tracks 777, 778, 779, 780 shown via referencenumerals 204, 206, 208, 210).

Control proceeds to block 406, in which the management application 114determines a first number of operations required to destage selectedtracks from a selected stride to create enough space in the selectedstride to accommodate the one or more tracks that are to be written. Thefirst number of operations required to destage selected tracks may bedetermined by analyzing the stride and track organization information120 stored in the controller 102. The management application 114 thendetermines (at block 408) a second number of operations required todefragment the selected stride to create enough space in the selectedstride to accommodate the one or more tracks. The second number ofoperations required to destage selected tracks may also be determined byanalyzing the stride and track organization information 120 stored inthe controller 102.

Control proceeds to block 410 in which the management application 414determines whether a first estimated duration of time to perform thefirst number of operations to destage selected tracks is a smalleramount of time than a second estimated duration of time to perform thesecond number of operations to defragment the selected stride. Forexample, from stored measurements of time taken to perform certainoperations for defragmenting or destaging in the past, the managementapplication 114 may estimate the first and second estimated duration oftime. For example, if an operation to destage each track has on anaverage taken 3 micro seconds during previous destagings, then the timetaken to destage 40 tracks may be estimated to be 40 times 3microseconds, which is 120 microseconds.

If at block 410 it is determined that the first estimated duration oftime to perform the first number of operations to destage selectedtracks is a smaller amount of time than the second estimated duration oftime to perform the second number of operations to defragment theselected stride (“Yes” branch from block 410) then control proceeds toblock 412 in which the destaging application 118 destages from the cache108 selected tracks from the selected stride to create adequatecontiguous space to write the one or more adjacent tracks contiguouslyon the selected stride.

If at block 410 it is determined that the first estimated duration oftime to perform the first number of operations to destage selectedtracks is not a smaller amount of time than the second estimatedduration of time to perform the second number of operations todefragment the selected stride (“No” branch from block 410) then controlproceeds to block 414 in which the defragmentation application 116defragments the selected stride to create adequate contiguous space towrite the one or more adjacent tracks contiguously on the selectedstride.

From blocks 412 and 414 control proceeds to block 416 in which themanagement application 114 writes the one or more adjacent tracks bothin a consecutive order and contiguously in the selected stride.

Therefore, FIG. 4 illustrates certain embodiments in which adequate freespace is created in a selected stride by either destaging tracks ordefragmenting the selected stride based on determining which action islikely to be performed faster.

FIG. 5 illustrates a second flowchart 500 that shows certain operations,in accordance with certain embodiments. In certain embodiments, theoperations shown in flowchart 500 may be performed by the managementapplication 114, the defragmentation application 116, and the destagingapplication 118 that may be implemented in software, firmware, hardwareor any combination thereof in the controller 102.

Control starts at block 502, in which compressed data is maintained in aplurality of strides 110 of a redundant array of independent disks 104,wherein a stride 110 is configurable to store a plurality of tracks 112a . . . 112 n. A request is received (at block 504) to write one or moretracks 204, 206, 208, 210.

Control proceeds to block 506, in the one or more tracks are written toa selected stride of the plurality of strides, based on comparing thenumber of operations required to destage selected tracks from theselected stride to the number of operations required to defragment thecompressed data in the selected stride (e.g., as shown in embodiments202, 302).

Therefore, FIG. 1-5 illustrates certain embodiments in which tracks thatare numbered consecutively are placed adjacent to each other incontiguous free space on a single stride, wherein the contiguous freespace is created either via the destaging of tracks or viadefragmentation of the single stride, based on whether destaging ordefragmentation is faster to perform.

Additional Embodiment Details

The described operations may be implemented as a method, apparatus orcomputer program product using standard programming and/or engineeringtechniques to produce software, firmware, hardware, or any combinationthereof. Accordingly, aspects of the embodiments may take the form of anentirely hardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,aspects of the embodiments may take the form of a computer programproduct embodied in one or more computer readable medium(s) havingcomputer readable program code embodied there.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java*, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider). *Java is a trademark or registered trademark of Oracle and/orits affiliates.

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

FIG. 6 illustrates a block diagram that shows certain elements that maybe included in the controller 102 or the host 106 in accordance withcertain embodiments. The system 600 may comprise the controller 102 orthe host 106 and may include a circuitry 602 that may in certainembodiments include at least a processor 604. The system 600 may alsoinclude a memory 606 (e.g., a volatile memory device), and storage 608.The storage 608 may include a non-volatile memory device (e.g., EEPROM,ROM, PROM, RAM, DRAM, SRAM, flash, firmware, programmable logic, etc.),magnetic disk drive, optical disk drive, tape drive, etc. The storage608 may comprise an internal storage device, an attached storage deviceand/or a network accessible storage device. The system 600 may include aprogram logic 610 including code 612 that may be loaded into the memory606 and executed by the processor 604 or circuitry 602. In certainembodiments, the program logic 610 including code 612 may be stored inthe storage 608. In certain other embodiments, the program logic 610 maybe implemented in the circuitry 602. Therefore, while FIG. 6 shows theprogram logic 610 separately from the other elements, the program logic610 may be implemented in the memory 606 and/or the circuitry 602.

Certain embodiments may be directed to a method for deploying computinginstruction by a person or automated processing integratingcomputer-readable code into a computing system, wherein the code incombination with the computing system is enabled to perform theoperations of the described embodiments.

The terms “an embodiment”, “embodiment”, “embodiments”, “theembodiment”, “the embodiments”, “one or more embodiments”, “someembodiments”, and “one embodiment” mean “one or more (but not all)embodiments of the present invention(s)” unless expressly specifiedotherwise.

The terms “including”, “comprising”, “having” and variations thereofmean “including but not limited to”, unless expressly specifiedotherwise.

The enumerated listing of items does not imply that any or all of theitems are mutually exclusive, unless expressly specified otherwise.

The terms “a”, “an” and “the” mean “one or more”, unless expresslyspecified otherwise.

Devices that are in communication with each other need not be incontinuous communication with each other, unless expressly specifiedotherwise. In addition, devices that are in communication with eachother may communicate directly or indirectly through one or moreintermediaries.

A description of an embodiment with several components in communicationwith each other does not imply that all such components are required. Onthe contrary a variety of optional components are described toillustrate the wide variety of possible embodiments of the presentinvention.

Further, although process steps, method steps, algorithms or the likemay be described in a sequential order, such processes, methods andalgorithms may be configured to work in alternate orders. In otherwords, any sequence or order of steps that may be described does notnecessarily indicate a requirement that the steps be performed in thatorder. The steps of processes described herein may be performed in anyorder practical. Further, some steps may be performed simultaneously.

When a single device or article is described herein, it will be readilyapparent that more than one device/article (whether or not theycooperate) may be used in place of a single device/article. Similarly,where more than one device or article is described herein (whether ornot they cooperate), it will be readily apparent that a singledevice/article may be used in place of the more than one device orarticle or a different number of devices/articles may be used instead ofthe shown number of devices or programs. The functionality and/or thefeatures of a device may be alternatively embodied by one or more otherdevices which are not explicitly described as having suchfunctionality/features. Thus, other embodiments of the present inventionneed not include the device itself.

At least certain operations that may have been illustrated in thefigures show certain events occurring in a certain order. In alternativeembodiments, certain operations may be performed in a different order,modified or removed. Moreover, steps may be added to the above describedlogic and still conform to the described embodiments. Further,operations described herein may occur sequentially or certain operationsmay be processed in parallel. Yet further, operations may be performedby a single processing unit or by distributed processing units.

The foregoing description of various embodiments of the invention hasbeen presented for the purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed. Many modifications and variations are possible in lightof the above teaching. It is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto. The above specification, examples and data provide acomplete description of the manufacture and use of the composition ofthe invention. Since many embodiments of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims hereinafter appended. *IBM, FlashCopyare trademarks or registered trademarks of International BusinessMachines Corporation.

What is claimed is:
 1. A method, comprising: receiving a request towrite one or more tracks; and writing the one or more tracks to aselected stride of a plurality of strides, subsequent to comparing howmany operations are required to destage selected tracks from theselected stride to how many operations are required to defragmentcompressed data in the selected stride, wherein contiguous free space iscreated on the selected stride either via destaging of the selectedtracks or via defragmentation of the selected stride in response todetermining whether the destaging or the defragmentation is faster. 2.The method of claim 1, wherein tracks that are numbered consecutivelyare placed adjacent to each other in the contiguous free space.
 3. Themethod of claim 1, the method further comprising: determining, by amanagement application executing in a controller coupled to a redundantarray of independent disks and a cache, whether a first estimatedduration of time to perform the number of operations required to destagethe selected tracks from the selected stride represented in the cache isa smaller amount of time in comparison to a second estimated duration oftime required to defragment the compressed data in the selected striderepresented in the cache; and destaging the selected tracks from thecache, by a destaging application executing in the controller, inresponse to determining that the first estimated duration of time is asmaller amount of time in comparison to the second estimated duration oftime.
 4. The method of claim 3, the method further comprising:defragmenting, by a defragmentation application executing in thecontroller, the selected stride, in response to determining that thefirst estimated duration of time is not a smaller amount of time incomparison to the second estimated duration of time.
 5. The method ofclaim 4, wherein: the writing the one or more tracks to the selectedstride of the plurality of strides is performed subsequent to thedestaging or the defragmenting; and the destaging or the defragmentingcreates adequate space in the selected stride to write the one or moretracks.
 6. The method of claim 3, wherein: the destaging of the selectedtracks is performed by copying the selected tracks from the cache tophysical storage, and by deleting the selected tracks in the selectedstride represented in the cache; and the defragmentation of the selectedstride is performed by moving existing tracks in the selected strideadjacent to each other towards the beginning of the selected stride andcreating contiguous free space towards the end of the selected stride.7. A system, comprising: a memory; and a processor coupled to thememory, wherein the processor performs operations, the operationscomprising: receiving, a request to write one or more tracks; andwriting the one or more tracks to a selected stride of a plurality ofstrides, subsequent to comparing how many operations are required todestage selected tracks from the selected stride to how many operationsare required to defragment compressed data in the selected stride,wherein contiguous free space is created on the selected stride eithervia destaging of the selected tracks or via defragmentation of theselected stride in response to determining whether the destaging or thedefragmentation is faster.
 8. The system of claim 7, wherein tracks thatare numbered consecutively are placed adjacent to each other in thecontiguous free space.
 9. The system of claim 7, the operations furthercomprising: determining, by a management application executing in acontroller coupled to a redundant array of independent disks and acache, whether a first estimated duration of time to perform the numberof operations required to destage the selected tracks from the selectedstride represented in the cache is a smaller amount of time incomparison to a second estimated duration of time required to defragmentthe compressed data in the selected stride represented in the cache; anddestaging the selected tracks from the cache, by a destaging applicationexecuting in the controller, in response to determining that the firstestimated duration of time is a smaller amount of time in comparison tothe second estimated duration of time.
 10. The system of claim 9, theoperations further comprising: defragmenting, by a defragmentationapplication executing in the controller, the selected stride, inresponse to determining that the first estimated duration of time is nota smaller amount of time in comparison to the second estimated durationof time.
 11. The system of claim 10, wherein: the writing the one ormore tracks to the selected stride of the plurality of strides isperformed subsequent to the destaging or the defragmenting; and thedestaging or the defragmenting creates adequate space in the selectedstride to write the one or more tracks.
 12. The system of claim 9,wherein: the destaging of the selected tracks is performed by copyingthe selected tracks from the cache to physical storage, and by deletingthe selected tracks in the selected stride represented in the cache; andthe defragmentation of the selected stride is performed by movingexisting tracks in the selected stride adjacent to each other towardsthe beginning of the selected stride and creating contiguous free spacetowards the end of the selected stride.
 13. A computer program product,the computer program product comprising: a computer readable storagemedium having computer readable program code embodied therewith, thecomputer readable program code configured to perform operations, theoperations comprising: receiving, a request to write one or more tracks;and writing the one or more tracks to a selected stride of a pluralityof strides, subsequent to comparing how many operations are required todestage selected tracks from the selected stride to how many operationsare required to defragment compressed data in the selected stride,wherein contiguous free space is created on the selected stride eithervia destaging of the selected tracks or via defragmentation of theselected stride in response to determining whether the destaging or thedefragmentation is faster.
 14. The computer program product of claim 13,wherein tracks that are numbered consecutively are placed adjacent toeach other in the contiguous free space.
 15. The computer programproduct of claim 13, the operations further comprising: determining, bya management application executing in a controller coupled to aredundant array of independent disks and a cache, whether a firstestimated duration of time to perform the number of operations requiredto destage the selected tracks from the selected stride represented inthe cache is a smaller amount of time in comparison to a secondestimated duration of time required to defragment the compressed data inthe selected stride represented in the cache; and destaging the selectedtracks from the cache, by a destaging application executing in thecontroller, in response to determining that the first estimated durationof time is a smaller amount of time in comparison to the secondestimated duration of time.
 16. The computer program product of claim15, the operations further comprising: defragmenting, by adefragmentation application executing in the controller, the selectedstride, in response to determining that the first estimated duration oftime is not a smaller amount of time in comparison to the secondestimated duration of time.
 17. The computer program product of claim16, wherein: the writing the one or more tracks to the selected strideof the plurality of strides is performed subsequent to the destaging orthe defragmenting; and the destaging or the defragmenting createsadequate space in the selected stride to write the one or more tracks.18. The computer program product of claim 15, wherein: the destaging ofthe selected tracks is performed by copying the selected tracks from thecache to physical storage, and by deleting the selected tracks in theselected stride represented in the cache; and the defragmentation of theselected stride is performed by moving existing tracks in the selectedstride adjacent to each other towards the beginning of the selectedstride and creating contiguous free space towards the end of theselected stride.